package com.ushine.design.jdk8.optional;

import java.util.Optional;

/**
 * @Author: yls
 * @Date: 2021/8/30 15:19
 * @Description:
 * @Version 1.0
 */
public class Address {
    private Country country;

    public Optional<Country> getCountry() {
        return Optional.ofNullable(country);
    }

    public void setCountry(Country country) {
        this.country = country;
    }

    @Override
    public String toString() {
        return "Address{" +
                "country=" + country +
                '}';
    }
}
